<template>
	<view>
		<view>
			
				<stop isBack>
					<view slot="content">文章详情</view>
				</stop>
		</view>
		<view>
			
			<view class="cu-card case no-card">
				<view class="cu-item shadow">
					<view class="cu-card case no-card mart1">
						<view class="cu-item shadow">
							<view class="image">
								<image :src="$api.getAssetBaseUrl() + item.cover" mode="widthFix"></image>
							</view>
							<view class="cu-list menu-avatar">
								<view class="cu-item">
									<view class="flex-sub lh2 padlr5">
										<view class="text-grey">{{item.title}}</view>
										<view class="text-gray text-sm flex justify-between">
											<text>{{$com.str2time(item.createAt)}}</text>
											<view class="text-gray text-sm">
												<text class="cuIcon-attentionfill margin-lr-xs"></text> <text>{{item.numView}}</text>
											</view>
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="pad3 bcf lh2 c11 ArtContent" v-html="item.content"></view>
		
		<view class="pad3 tac bcf">
			<view class="bdtda bdc12 padt3 c12 fs8 op7">我是有底线的</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:0,
				item:{}
			}
		},
		methods: {
			
		},
		onLoad(option) {
			let id = option.id
			this.id = id
			// this.$api.get('/api/articles/' + id,{},(res)=>{
			// 	this.item = res.d
			// })
		},
		onShow() {
			this.$api.get('/api/articles/' + this.id,{},(res)=>{
				this.item = res.d
			})
		}
	}
</script>

<style>
.ArtContent image,.ArtContent img{
	max-width: 100%!important;
}
</style>
